Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request?
This PR adds labels to the request handlers for the routes added by the node sdk to all applications -
/healthcheck
,/_metrics
and/:account/:workspace/_whoami
. Currently, the handlerundefined
is TOP 5 handler in the metrics forruntime_http_requests_total
- ref:one thing that doens't make sense to me is the scale in this dashboard - I might have queried it wrong, but the intention here is to show the relevance of the undefined events
What problem is this solving?
The handler name is added to the metrics based on
ctx.requestHandlerName
- ref. TherequestHandlerName
is added by the nameSpanOperation Middleware, and it's applied to theappHttpHandlers
,appEventHandlers
andappGraphQLHandlers
not to theruntimeHttpHandlers
- here.appHttpHandlers
, it's is applied for both private and public routes, it's added here and here;appEventHandlers
, it's applied here;appGraphQLHandlers
, it's applied here.By adding the
requestHandlerName
to the context in the routes created byruntimeHttpHandlers
we should be able to better filter the http metrics for applications.